package cn.wolfcode.crm.service;

import cn.wolfcode.crm.domain.Employee;
import cn.wolfcode.crm.query.EmployeeQueryObject;
import cn.wolfcode.crm.query.PageResult;
import org.springframework.web.multipart.MultipartFile;

import java.io.IOException;
import java.util.List;

public interface IEmployeeService {

    Employee selectByPrimaryKey(Long id);


    PageResult query(EmployeeQueryObject qo);

    /**
     * 用户名状态
     * @param username
     * @param id
     * @return
     */
    Boolean selectByName(String username,Long id);

    /**
     * 改变状态
     * @param id
     */
    void changeState(Long id);

    void saveOrUPdate(Employee employee);

    /**
     * 重置密码
     * @param id
     * @param newPassword
     */
    void changePassword(Long id, String newPassword);

    Employee login(String username);
    List<Employee> selectAll();

    void importData(MultipartFile file) throws IOException;

    List<Employee> selectExportData(EmployeeQueryObject qo);
}
